package com.zx.zxapiclientsdk.utils;

import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;

/**
 * @author 张旭
 * @version 1.0
 */
public class SignUtils {
    /**
     * 生成签名
     *
     * @param body      用户参数
     * @param secretKey 密钥
     * @return 不可解密的值
     */
    public static String getSign(String body, String secretKey) {
        Digester md5 = new Digester(DigestAlgorithm.SHA256);
        String content = secretKey + "." + body;
        String digestHex = md5.digestHex(content);
        return digestHex;
    }
}
